// primise封装

export const getSetting=()=>{
  return new Promise((resolve,reject)=>{
    wx.getSetting({
      success: function (res) { 
        resolve(res)
      },
      fail: function (res) {
        reject(res)
       },
    })
  })
}


export const chooseAddress = () => {
  return new Promise((resolve, reject) => {
    wx.chooseAddress({
      success: function (res) {
        resolve(res)
      },
      fail: function (res) {
        reject(res)
      },
    })
  })
}

export const openSetting = () => {
  return new Promise((resolve, reject) => {
    wx.openSetting({
      success: function (res) {
        resolve(res)
      },
      fail: function (res) {
        reject(res)
      },
    })
  })
}